# -*- coding:utf-8 -*-
"""整站路由配置文件
"""
from tornado.web import StaticFileHandler
import os
from demo import handlers as DemoH
from user import handlers as UserH
from wechatqy import handlers as wechatqyh
from tools import handlers as toolsh

URLS = [
    (r'/demo', DemoH.DemoHandler),                                                    # 例子
    (r'/lamian', DemoH.LamianHandler),                                                    # 例子
    (r'/login', UserH.LoginHandler),                                                  # 登录
    (r'/logout', UserH.LogoutHandler),                                                # 注销
    (r'/index', UserH.IndexHandler),                                                  # 首页
    (r'/menumanage', UserH.MenuManageHandler),                                                  # 菜单管理
    (r'/updatemenu', UserH.UpdateMenuHandler),                                                  # 菜单管理
    (r'/delmenu', UserH.DelMenuHandler),                                                  # 菜单管理
    (r'/', UserH.IndexHandler),                                                  # 首页
    
    (r'/timelist', toolsh.TimeListHandler),                                                  # 橙子用  时间列表
    (r"/(menu_manage\.html)", StaticFileHandler,
     dict(path=os.path.join(os.path.dirname(__file__), "templates"))),
]


WECHATQYURLS = [
    (r'/getvotelist', wechatqyh.VoteListHandler),                                                  # 菜单管理
    (r"/(vote_manage\.html)", StaticFileHandler,
     dict(path=os.path.join(os.path.dirname(__file__), "templates", "wechatqy"))),
]